From: Florian Müllner Date: Thu, 21 Dec 2017 15:51:28 +0000 (+0100) Subject: network: Fix visibility of VPN section X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~120 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f91fbd7728061d0f66777c91c0a981792e0fada7;p=gnome-shell.git network: Fix visibility of VPN section Commit f2a9467f91b was too eager to simplify the code, and removed the bits that hid the section in case no VPNs are set up - add them back to fix the visibility. https://bugzilla.gnome.org/show_bug.cgi?id=787845 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 9575af7de..ad373f6e6 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1492,6 +1492,15 @@ var NMVPNSection = new Lang.Class({ this.parent(client); this.item.menu.addSettingsAction(_("VPN Settings"), 'gnome-network-panel.desktop'); + + this._sync(); + }, + + _sync: function() { + let nItems = this._connectionItems.size; + this.item.actor.visible = (nItems > 0); + + this.parent(); }, _getDescription: function() {